home *** CD-ROM | disk | FTP | other *** search
- Xref: bloom-picayune.mit.edu comp.os.linux:18318 news.answers:4214
- Path: bloom-picayune.mit.edu!enterpoop.mit.edu!usc!zaphod.mps.ohio-state.edu!cs.utexas.edu!uunet!mcsun!julienas!corton!geocub!labri.greco-prog.fr!corsini
- From: corsini@labri.greco-prog.fr
- Newsgroups: comp.os.linux,news.answers
- Subject: Linux Frequently Asked Questions 2/4 [monthly posted]
- Summary: Linux, a small and free unix for 386-AT computers.
- Message-ID: <PART2_722647309@geocub.greco-prog.fr>
- Date: 24 Nov 92 23:22:02 GMT
- Expires: Sat, 19 Dec 1992 23:00:00 GMT
- References: <PART1_722647309@geocub.greco-prog.fr>
- Sender: corsini@greco-prog.fr (Marc-Michel CORSINI)
- Reply-To: linux@numero6.greco-prog.fr
- Followup-To: poster
- Organization: Greco Prog. CNRS & LaBRI, Bordeaux France
- Lines: 1132
- Approved: news-answers-request@MIT.Edu
- Supersedes: <PART2_722567366@geocub.greco-prog.fr>
-
- Archive-name: linux-faq/part2
- Last-Modified: 92/11/20
- Version: 1.11
-
- *********************************************************
- * *
- * Answers to Frequently asked questions about Linux *
- * *
- *********************************************************
-
- This post contains Part 2 of the Linux FAQ (4 parts).
- It must be read *after* the first part.
-
- ================================8<=====8<==============================
- CONTENTS (of this part)
-
- IV. LINUX and DOS (part2)
- V. SOME CLASSICAL PROBLEMS (part2)
- VI. MISCELLANEOUS HINTS (part2)
- VII. MORE HINTS (part2)
-
- ===================================8<====>8============================
-
-
- IV. LINUX and DOS
- =================
- *** This section is co-written by Mark Komarinski, A. V. Le Blanc and
- *** MM. Corsini. The official maintainer is Mark, if you have *any*
- *** questions, critics \ldots, mail him at komarimf@craft.camp.clarkson.edu
- *** Last Update 15.11.92
-
-
- QUESTION: Is is possible to access DOS from Linux?
-
- ANSWER: Yes.
- (1) The mtools package allows you to access DOS files;
- it emulates the DOS commands CD, COPY, DEL, DIR, TYPE, and others.
- (2) Since approximately version 0.97 of the kernel, you can mount
- DOS file systems as part of your Linux directory tree, providing you
- have an appropriate mount command.
- (3) A DOS emulator is in alpha test, which will allow some DOS programs
- and utilities to run under Linux.
-
-
- QUESTION: Why use mtools if you can just mount a drive?
-
- ANSWER: Mtools is good if you want to do something quickly. For
- example, if you want to get directories on a bunch of floppies. The
- mount procedure requires you to mount the drive, get a directory, then
- umount it. Mtools lets you get the directory with one command.
-
- (Dirk Hohndel:) Mtools is really fast when copying disks. I mount the
- SLS directory of my SUN to my linux box and use mcopy to get the files
- on the disks. 3 times faster than using xcopy under DOS
-
- QUESTION: How do I get the mtools package set up correctly?
-
- ANSWER: The mtools package is available in source form on most Linux
- ftp sites. The most recent version (As of Sept 1992) is mtools.n2,
- and there are linked binaries and library (.a) files available as
- well (for example, as part of MCC interim releases of Linux).
- In the n2 release of mtools, there is only one executable binary
- which works differently depending on its name: you can create hard
- or symbolic links to it named mcopy, mdel, mdir, mtype, etc; this
- is how the Makefile in version n2 of mtools does it, and it saves
- several hundred kilobytes of disk space. Finally, you need the
- correct information in the file /etc/mtools, which is described below.
-
- QUESTION: What is the format of the file /etc/mtools?
-
- ANSWER: A complete entry in the file /etc/mtools contains the following
- fields: drive, device, fat, cylinders, heads, sectors, offset. Two
- examples of entries from /etc/mtools are
-
- A /dev/fd0 12 80 2 15
- C /dev/hda1 16 0 0 0
-
- which defines the DOS disk A: as accessible through the device /dev/fd0,
- having a 12-bit FAT, 80 cylinders, 2 heads, and 15 sectors per track;
- DOS disk C: is accessible through the device /dev/hda1, has a 16-bit
- FAT, and its geometry is simply that of the hard disk where it lives.
- The last three numbers can be 0 if you wish; this allows mtools to
- try to figure out the disk's geometry itself, and perhaps to fail.
- A 12-bit FAT is common for floppies, but may occur in small hard
- disk partitions. A 16-bit FAT is common for hard disks.
- This is an extract of my /etc/mtools file:
- A /dev/fd0 12 0 0 0 # 3.5 1.4 Meg (autodetect)
- B /dev/fd1 12 0 0 0 # 5.25 1.2 Meg (autodetect)
- C /dev/hda1 16 0 0 0 # 1st partition of my Disk
-
- QUESTION: Where can I find out more about mtools?
-
- ANSWER: There are two detailed README files in the mtools.n2 distribu-
- tion. These files treat compiling and using mtools. There is a file
- README.mtools which treats only using mtools, which is a part of the
- MCC interim version of Linux.
-
-
- QUESTION: How do I use the DOS file system?
-
- ANSWER: The DOS file system is part of the kernel. If you have a
- kernel of level 97.1 or above, and an appropriate mount command, type
-
- mount -t msdos [-o conv=text] /dev/hda1 /dos
-
- to mount the partition /dev/hda1 as an MS/DOS file system on the
- directory /dos. You'll need a recent mount command, from at least
- release 97 or later of the root disk. Recent mount commands also
- accept the options conv=binary|text|auto (default is binary) to
- specify that text end-of-lines in DOS files are to be converted to
- UNIX end-of-lines (by omitting carriage return characters) in no cases
- (binary) or in all cases (text) or in cases that don't have 'well-
- known binary extensions' (e.g., .EXE or .COM) (auto).
-
-
- QUESTION: I want to use the DOS file system with either conv=binary or
- conv=auto, but I want to convert text files from DOS to UNIX format,
- or from UNIX to DOS format.
-
- ANSWER: Use the utility todos/fromdos which comes as part of the
- dosfs package, currently (Sept 92) in released in version 8, or
- use the flip utility by Rahul Dhesi.
-
- QUESTION: Where can I find out more about the DOS file system?
-
- ANSWER: There is a README file included in dosfs.XX.tar.Z (the current
- value of XX is 8), and an abbreviated version of this in the MCC
- interim package.
-
-
- QUESTION: Whenever I use mtools to read a 720K in an 1.44MB drive, I
- get a long sequence of reset-floppy-errors, why?
-
- ANSWER: This is what happens if you use the /dev/PS0 device (b 2 28),
- to read a 720k floppy you have to use another device, for example
- /dev/fd0. Or you may use the setfdprm utility.
-
-
- QUESTION: This sounds me like a chicken and eggs problem, how can I
- install the mtools package at the very beginning.
-
- ANSWER: You have to use the rawrite stuff or the mount procedure.
-
-
- QUESTION: Could someone explain how to use rawrite?
-
- ANSWER: Well, rawrite is a DOS util, which write sequential sector of
- a formatted disk/floppy. When a floppy has been rawritten, you can
- (under Linux) untar it (use x, v, z and f flags). As an example:
- a) under Dos use rawrite
- rawrite
- source: kermit.z
- destination: a
- b) boot under Linux, and perform a tar
- tar zxvf /dev/fd0
- tar zxvp < /dev/fd0
-
-
- You DO NOT NEED TO MOUNT a rawritten disk
-
-
- QUESTION: What is as86.tar.Z ?
-
- ANSWER: It's the port of Bruce Evans' minix assembler, you need it to
- be able to recompile Linux at your convenience. In fact this is ONLY
- used for boot/setup.S and boot/bootsect.S they create 80x86 REAL mode
- code.
-
-
- QUESTION: Turbo (Microsoft) Assembler won't compile the Linux boot
- code. In fact, some of the opcodes in these files look completely
- unfamiliar. Why?
-
- ANSWER: The Linux boot codes are written in Bruce Evans' minix
- assembler, which has the same opcodes as the original minix assembler
- ported to linux get as86.tar.Z Anyway there are a few differences
- between these and normal DOS assemblers.
-
- QUESTION: What about the dos emulator (dosemu)?
-
- ANSWER: Dosemu is in alpha testing now, so it is very unstable and crashes
- easily. Some programs (such as earlier versions of Turbo Pascal; TP
- 5.5 too) seem to work fine, but other programs such as dir /p will
- crash the emulator.
- Look in your favorite FTP site for the dosemu kit.
-
-
- V. SOME CLASSICAL PROBLEMS
- ==========================
-
- QUESTION: While running du I get "Kernel panic: free_inode: bit
- already cleared". Also, du produces a ENOENT error for all the files
- in certain of my directories. What's going on?
-
- ANSWER: These are both consistent with a bad file-system. That's
- relatively easy to produce by not syncing before rebooting, as linux
- usually has 1.5MB of buffer space held in memory (unless you have <=4M
- RAM, in which case the buffers are only about 0.5MB). Also linux
- doesn't do anything special about the bit-map blocks, and as they are
- used often, those are the thing most likely to be in memory. If you
- reboot, and they haven't been written to disk ...
-
- Just do an fsck on the device, the -a flag might repair it otherwise,
- the only thing to do is to reinstall the filesystem from the Images.
-
- A sync is done only every 30 seconds normally (standard unix
- practice), so do one by hand (some people think you should do 3 syncs
- after each other, but that's superstition), or by logging out from the
- startup-shell, which automatically syncs the system. Unmounting a
- filesystem also syncs it (but of course you can never unmount root).
-
- Another (sad) possibility is that you have bad blocks on your disk.
- Not very probable, as they would have to be in the inode-tables, just
- a couple of blocks in size. Again there aren't programs available to
- read a disk for bad sectors and put them in some kind of
- "bad-sector-file". On IDE drives this is no problem (bad sectors are
- automatically mapped away).
-
-
- QUESTION: How can I partition my hard-drive to use Linux?
-
- ANSWER: There are (at least) two ways to answer this. The easy way is
- probably to use a program which will do it for you, such as the MS-DOS
- fdisk, Minix fdisk, Xenix/Unix fdisk, or programs such as edpart.exe
- or part.exe. With the 0.95a distribution, there is pfdisk. To use it
- have a look in the beginner's guide written by I. Reid, it's clear and
- it had worked for me like a charm. In the mcc-interim release ther is
- also fdisk, which runs under Linux and manages partition tables
- (it also creates extended partitions).
-
- On the other hand, you can use a disk editor and modify the contents
- of the partition table directly. This has been already done, and an
- extensive explanatory note can be found in the mailing-list archives
- (25th Jan. 92). You must also edit the bpb on the Dos partition you
- are shrinking, otherwise Dos will step on Linux.
-
- BTW It might be useful to set three (3) separated partitions for
- Linux, one for the root, another one for the usr and a third one for
- swap, as an illustration, my root partition is 10Meg, the usr is 22Meg
- and instead of a swap partition I use a swap file. As an experience I
- have used MS-DOS fdisk to partition my two hd and got no peculiar
- difficulties.
- You can, as long as you stay within the 64MB per filesystem limit
- (Minix-filesystem limitation), have swap, root, etc, ... all on there.
-
-
- QUESTION: I heard something about repartition a hard disk without
- deleting everything on it, any clue?
-
- ANSWER: It's not a program but a partition procedure which requires
- a) a partitionning program
- b) a sector editor
- The procedure itself can be found (at least) in digest#132 Vol2.
-
-
- QUESTION: What must I do to mkfs a floppy?
-
- ANSWER: blocks are of size 1K so 1.44 floppy is 1440 blocks. The
- floppy has to be formatted before this will work (e.g., fdformat can
- do this from within Linux).
-
-
- QUESTION: I have some trouble with tar/untar; any clue ?
-
- ANSWER: The tar provided on .96 and latter is Pax (don't know for .98)
- which do not accept the z flag. You can download the GNU tar at tsx-11
- in /pub/linux/binaries/usr.bin
-
-
- QUESTION: I can do this as root but not as non-root, is it a bug?
-
- ANSWER: Except for an early make utility, the problem is caused by an
- incorrect permission flag. The most common problems are about /tmp
- which should be 1777 and /dev/ttys? which might be 766. So as root do
-
- chmod 1777 /tmp ; chmod 766 /dev/ttys?
-
-
- QUESTION: "du" reports twice the size showed with "ls -l", is it a
- bug?
-
- ANSWER: No it is not, the report is 512 bytes multiple (due to POSIX
- requirement), for KB you just add the -k flag. You can add a du
- function in your .profile which does this automatically, something
- like du(){ /usr/bin/du -k $* }
-
-
- QUESTION: Sometimes, I get "mount can't open lock file"; what does this
- means?
-
- ANSWER: This can happened for two reasons:
- A) You try to mount something as non-root. In that case you can either
- retry as root, or set the setuid bit to mount as follows:
- - be sure that mount belongs to root, if not do 'chown root /bin/mount'
- - set the setuid bit with 'chmod u+s /bin/mount'
- BTW you have to do the same with umount (in order to be able to unmount)
- Remark that it is NOT safe to allow anyone to perform mount/umount,
- you should rather write a small utility that will make any user able
- to mount/unmount a (and ONLY a) *floppy*
- B) You are root. mount wants to open /etc/mtab and /etc/mtab~ - the
- first one for reading, the second as lock file. If there is already a
- mtab~ remove it. This can happen if you used once gnuemacs on mtab.
-
- To forbid that case, just add the following entry in your /etc/rc file:
- rm -f /etc/mtab
-
-
- QUESTION: When I try "mount /dev/hd?? /user", I get error 2.
-
- ANSWER: Be sure, that your mount point /user does exist; if not perform
- a "mkdir /user".
- BTW the error numbering is explained in /usr/include/errno.h
-
-
- QUESTION: Since I have upgrade my Linux kernel, ps won't work anymore,
- why?
-
- ANSWER: Each time you upgrade (or re-compile the kernel), you should
- perform a 'ps -U' (-U is for update the /etc/psdatabase).
-
- Every time you boot a new kernel you have to do a 'ps U' to update
- the psdatabase, after doing this you can remove the system file or
- do a make clean.
-
- The pathname to the system binary [/usr/src/linux/tools/system] is
- stored in the psdatabase, so you only have to specify it if you have
- moved your source tree or if you are creating the psdatabase for the
- first time. The psdatabase is always '/etc/psdatabase'. The system
- file is obtained in compiling the linux kernel (which I assume is
- rooted in /usr/src/linux).
-
- BTW: sometimes a patch makes recompiling ps necessary. Sometimes you
- even have to patch the ps-suite.
-
-
- QUESTION: Since Linux 0.96b I have a lot of core file all over
- my disk. How can I sweep them away ?
-
- ANSWER: Use the following command
- find / -name core -exec rm {} \;
-
- BTW: think twice before using this command, there might be a John Core
- user on your system; this command will erase his mail :)
-
- (Rick) If you never want to see another core file, put this line into
- your /etc/rc file:
- ulimit -c 0
-
- provided you are a bash user :))
-
-
- QUESTION: I can only log-in as "root", is it normal ?
-
- ANSWER: No, add "rm -f /etc/nologin" in your /etc/rc.local file
-
-
- VI. MISCELLANEOUS HINTS
- =======================
- *** This section is maintained by Matt Welsh (mdw@tc.cornell.edu). Please
- *** mail me if you have any changes/updates/questions. Thanks -mdw
-
- Special gcc information are located in section IX. A special section is
- devoted to it since it's *the* compiler of Linux. I have subsectionned
- this part in 3 subsections: Misc/Device Major-Minor/Serial Information.
-
- VI.A. Misc information
- ~~~~~~~~~~~~~~~~~~~~~~
-
- QUESTION: It seems that $#@! ported on linux don't run correctly, what
- do I do about reporting bugs?
-
- ANSWER: (Matt Welsh) It's possible that either the program itself has a bug
- or that Linux has a problem that this program brings out. :) But first check
- that the size of the file(s) corresponds that of the files(s) on the FTP
- sites where it's available. If they're different, either you downloaded them
- incorrectly (i.e. you forgot to turn on "bin") or whoever put them on the
- FTP site uploaded them incorrectly.
-
- If that's not the problem, then post to comp.os.linux asking about the
- program, to verify that it is a bug. PLEASE: when posting possible "bug
- reports" include all error and output information from running/compiling
- the program. Just saying "it doesn't work" isn't very helpful. Also mention
- your specific setup, Linux version, GCC version, etc. Some of these things
- depend on running under certain versions and you may have missed that
- information.
-
- Note that my "ml-linux-bugs@dg-rtp.dg.com" bug reporting list has been
- phased out. It turns out that Linux has so few bugs, most of which are
- resolved on the newsgroup or through Linus before I can accumulate them
- and post. :) In short: if there's a bug in Linux or in Linux-ported
- software, it will usually be fixed in the next patchlevel or version.
-
-
- QUESTION: Has $#@! been ported to Linux?
-
- ANSWER: First check out the FTP sites and read the monthly INFO-SHEET,
- as well as the new "Linux News" and the META-FAQ's (all of which are
- either available on the FTP sites and/or posted to the newsgroup as they're
- written). Also check out the "Linux Project Registry" (posted to the
- newsgroup and on the FTP sites) which lists ongoing/current Linux projects.
- Also look in the "old" Linux digests and mailing-list archives, kept on
- tsx-11.mit.edu and nic.funet.fi. Also, see if there's a GNU(*) version
- of the program you're looking for (which are available everywhere).
- Since Linux uses GCC as its native compiler, most GNU software ports
- directly to Linux without problems. If all else fails, ask on the
- mailing list or newsgroup if the program is ported and where it's
- available.
-
-
- (*) GNU stands for GNU's Not Unix, which (besides being a recursive
- acronym) is a project started by the Free Software Foundation (the FSF)
- to write a freely distributable version of Unix. The GNU kernel is
- named HURD, and is based on Mach. It is currently being written, and is
- not yet done. Many of the GNU utilities, however, are completed and are
- much more functional than the original Unix utilities. Since they are
- freely available, Linux is using them as well.
-
-
-
- QUESTION: I've ported $#@! to Linux, what should i do to add it in the
- standard distribution?
-
- ANSWER: (Matt Welsh) First read the previous Q/A, then talk to the
- maintainers of the various releases (MCC interim, SLS, and so on)
- about including your program with those releases. The best way to make
- programs available to the rest of the world is to upload it to one of
- the Linux FTP sites (such as tsx-11.mit.edu:/pub/incoming or
- sunsite.unc.edu:/pub/Linux/Incoming).
-
- BTW Whenever you submit binaries, please think that if you link them
- with shared libraries, this might cause problems for those who (gasp!)
- don't have the shared libraries installed. You can either link them
- using -static, and if someone wants to build a shared version on their
- own machine they can get the sources (which you should also make
- available) and build it themself. Or else provide the shared lib.
-
-
- QUESTION: I want to port $#@! to Linux, what are the flags?
-
- ANSWER: Recall that Linux implements subset of SYSV and POSIX, so
- -DUSG and -DPOSIX work in general.
-
- NOTE1: SIGBUS is not there, and can be safely commented out in general.
- NOTE2: see section related to GCC, in the third part of this FAQ, for
- more details.
-
- VI.B. Major/Minor device number
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *** This section is maintained by Rick Miller, any comments,
- *** suggestions, remarks should be mailed to him at <rick@ee.uwm.edu>
- *** Last Update: 17 Nov 1992 16:00:20 GMT
-
- QUESTION: What are the device minor/major numbers?
-
- ANSWER: Here's a preliminary listing from Rick Miller <rick@ee.uwm.edu>:
-
- The Linux Device List
- published by rick@ee.uwm.edu (Rick Miller, Linux Device Registrar)
-
- Many thanks to richard@stat.tamu.edu and Jim Winstead Jr.
-
- Majors:
- 0. Unnamed . (unknown) .... for proc-fs, NFS clients, etc.
- 1. Memory .. (character) .. ram, mem, kmem, null, port, zero
- 2. Floppy .. (block) ...... fd[01][dhDH]{360,720,1200,1440} or fd[01]
- 3. Hard Disk (block) ...... hd[ab] or hd[ab][1-?] (Extended>4)
- 4. Tty ..... (character) .. tty{0,1-8,63,64-127,128-?} or ttys{0-3,1-4}
- 5. tty ..... (character) .. special tty: owner of its calling process.
- 6. Lp ...... (character) .. lp[0-2] or par[0-2]
- 7. Tape .... (block) ...... t[0-?] (reserved for Non-SCSI tape drives)
- 8. Scsi Disk (block) ...... sd[0-?] or sd[0-?][0-?]
- 9. Scsi Tape (block) ...... st[0-?]
- 10. Bus Mouse (character) .. bm, psaux (mouse)
- 11. CD-ROM .. (block) ...... scd
-
- Breakdown of minors by Majors:
- ------------------------------
-
- 0. Unnamed . (unknown) .... for proc-fs, NFS clients, etc.
- Minors??? (Not yet implemented???)
-
- 1. Memory .. (character) .. ram, mem, kmem, null, port, zero
- 0. /dev/ram
- 1. (block): RAM-Disk (character): /dev/mem
- 2. /dev/kmem
- 3. /dev/null
- 4. /dev/port
- 5. /dev/zero
-
- 2. Floppy .. (block) ...... fd[01][dhDH]{360,720,1200,1440} or fd[01]
- Minors are [drive + [4 * type]] where drive 0-3 == A:-D: (floppy)
- and type is: 0: Autodetect 4: 720k in 3.5"
- 1: 360k in 5.25" 1.2M 5: 360k in 5.25" 1.2M
- 2: 1.2M in 5.25" 1.2M 6. 720k in 5.25" 1.2M
- 3: 360k in 3.5" 7. 1.44M in 3.5" 1.44
-
- 3. Hard Disk (block) ...... hd[ab] or hd[ab][1-?] (Extended>4)
- 0. First HD (/dev/hda), whole drive including Master Boot Record.
- 1-4. Partitions on the first HD.
- 5-8. Logical partitions within an extended partition on first HD.
- 64. Second HD (/dev/hdb), whole drive including Master Boot Record.
- 65-68. Partitions on the second HD.
- 69-72. Logical partitions within an extended partition on second HD.
-
- Notes: BE *VERY* CAREFUL WITH /dev/hda AND /dev/hdb!! These two
- devices signify the *entire* *drive*, not just one partition.
- The only things that use /dev/hda or /dev/hdb are things that
- need to read/change the partition table (like fdisk).
-
- The names of the hard drives are not the same as under Minix.
-
- Linux doesn't order anything. It perceives partitions in the
- order in which they appear in the partition table. Thus,
- /dev/hd?1 may be physically after /dev/hd?2.
-
- 4. Tty ..... (character) .. tty{0,1-8,63,64-127,128-?} or ttys{0-3,1-4}
- 0. /dev/tty0: This is the currently active Virtual Console.
- 1-63. /dev/tty#: Specific virtual consoles.
- 64-127. /dev/ttys*: Serial ports.
- 128-191. /dev/pty[??]: PTY Masters.
- 192-255. /dev/pty[??]: PTY Slaves.
-
- Notes: There are several constants set in the kernel sources which
- can be changed to compile a more customized kernel. They're
- found in [/usr/src]/linux/include/linux/tty.h:
-
- NR_CONSOLES The number of virtual consoles.
- NR_SERIALS The number of serial lines.
- NR_PTYS The number of pty's.
-
- 5. tty ..... (character) .. special tty: owner of its calling process.
- 0. /dev/tty: the tty that owns the process calling it.
-
- 6. Lp ...... (character) .. lp[0-2] or par[0-2]
- 1-3. Parallel (printer) ports. (Increasable in include/linux/lp.h)
-
- Notes: The number of line printers is defined by LP_NO which is
- found in [/usr/src]/linux/include/lp.h.
-
- 7. Tape .... (block) ...... t[0-?] (reserved for Non-SCSI tape drives)
- This one's just getting started. No minor numbers are yet assigned.
- It's not even in the source code.
-
- 8. Scsi Disk (block) ...... sd[0-?] or sd[0-?][0-?]
- Minors numbers are [[16 * HostID] + partition]
-
- Notes: The maximum number of SCSI drives is defined by MAX_SD
- found in [/usr/src]/linux/kernel/blk_drv/scsi/sd.h.
-
- Additional note (Eric Youngdale): In the new scsi drivers
- there is no set maximum number of scsi disks, hence no need to fiddle
- with sd.h Everything autoconfigures as the system boots.
-
- 9. Scsi Tape (block) ...... st[0-?]
- Quoting from the source-code:
- void do_st_request(void)
- {
- panic("There is no st driver.\n\r");
- }
-
- Notes: For future reference, the maximum number of SCSI tapes
- is defined by MAX_ST which is found in
- [/usr/src]/linux/kernel/blk_drv/scsi/st.h.
-
- (E. Youngdale) The same is true here. There is no longer any
- need to set MAX_ST, and it would be a bad thing to actually try. Even
- though there is a MAX_SR in the cdrom code in the 0.98.5 kernel, the
- new scsi code effectively eliminates this as well.
-
- 10. Bus Mouse (character) .. bm, psaux (mouse)
- (If I recall, X Windows requires that
- /dev/mouse be linked to one of these...)
- 0. /dev/bm: (Logitec?) bus mouse
- 1. /dev/psaux: PS/2 mouse port
- 2. /dev/bm: MicroSoft bus mouse
- 3. /dev/bm: ATI XL bus mouse
-
- 11. CD-ROM .. (block) ...... scd
- Minors?
-
- From: eric@tantalus.nrl.navy.mil (Eric Youngdale)
- Date: 17 Nov 92 16:25:40 GMT
-
- > For the cdrom, the minors are just the devices
- > themselves. If you have one cdrom drive, the minor is 0. If you
- > have two, then the minors are 0 and 1. Not much more to it than that.
-
- > For a SCSI tape, each physical device has two minor numbers
- > that are associated with it. If you have two tape drives, then
- > minors 0 and 1 will refer to the first and second drives and the
- > tape will be rewound when the device is closed. Minor numbers 128
- > and 129 (i.e. 128+n) also refer to the first and second physical
- > drives, but the tape will not be rewound after closing the device.
- > If you have one tape, you could create the devices with the
- > following commands:
-
- > mknod /dev/rmt0 c 9 0
- > mknod /dev/nrmt0 c 9 128
-
-
- NOTE: all the numbers given are in decimal form (the one you can see if
- you perform ls -l on /dev).
-
-
- QUESTION: Could some one give me indication about the meaning of the
- IRQ's ?
-
-
- ANSWER: (alawrenc@sobeco.com:)
- Standard IRQ's :
- IRQ 0 - Timer
- IRQ 1 - Keyboard
- IRQ 2 - Slave 8259 (AT)
- IRQ 3 - COM 2 / COM 4
- IRQ 4 - COM 1 / COM 3
- IRQ 5 - (XT) Hard Disk, (AT) LPT2
- IRQ 6 - Floppy Disk
- IRQ 7 - LPT1
-
- AT only IRQ 8 - Real Time Clock
- IRQ 9 - Re-direct to IRQ 2
- IRQ 10 - Not Defined
- IRQ 11 - Not Defined
- IRQ 12 - Not Defined
- IRQ 13 - 80287
- IRQ 14 - Hard Disk (AT)
- IRQ 15 - Not Defined
-
- QUESTION: (Chuck Boyer) Could some one clear up the devices meaning?
-
- ANSWER: (Jim Winstead Jr)
- >port
-
- This allows programs to access the hardware ports directly. Not
- something you generally mess around with much.
-
- >ptyp0-3
- >ptypa...tty
-
- These are the pseudo-tty 'master' devices. Each pty connection uses
- a slave-master set of tty devices.
-
- >tty0...
-
- tty[1-8] are the virtual consoles associated with Alt-F[1-8]. tty0 is
- the current virtual console (so writing something to tty0 goes to the
- current vc).
-
- >tty64 I've figured out is the modem connection
-
- Yes, that would correspond to COM1 under DOS. However, the tty64 name
- is obsolete - ttys[1-4] should be used instead.
-
- >ttyp0...
- >ttypa...
-
- These are the pseudo-tty 'slave' devices.
-
- >ttys1...
-
- These are the serial devices. ttys1 corresponds to COM1 under DOS,
- ttys2 corresponds to COM2, etc.
-
-
- VI.C Special Serial
- ~~~~~~~~~~~~~~~~~~~
- *** This section is maintained by Jim Gifford
- *** (jgifford@attmail,world.std}.com
- *** Last update October 1992.
-
- Douglas E. Quale:
- This has come up a couple of times already (including the case of
- serial mice as well), but for the record stty acts on stdin not
- stdout. Old stty's (from V7 through BSD4.3) used stdout, but this is
- suboptimal and doesn't conform to POSIX. The GNU stty you are likely
- using on Linux uses stdin, as does the stty distributed with BSD
- Networking Release 2. (Also, ``stty -a'' is more informative about
- possible parameters, although it's pretty hard for me to remember what
- 90% of that stuff does without refering to the man page.)
- Jim Gifford:
- However, there are a few older (of mysterious origin) stty's that work
- on stdout(I have one myself!)
-
- QUESTION: Is there a list somewhere where I can get help with serial
- communications under Linux?
-
- ANSWER: (Jim Gifford -- jgifford@world.std.com)
- There is a list for the discussion of serial communications under
- Linux. It is for problems, drivers, new developments, etc... with
- the Linux serial devices. The list is: linux-serial@stolaf.edu
- To join, send mail to linux-serial-request@stolaf.edu
- I hope that this list will prove beneficial to the improvement of
- Linux. This list is maintained by Michael K. Johnson as
- linux-serial-request@stolaf.edu
-
- QUESTION: When I run kermit under Linux, I get "Warning, Read access
- to lock directory denied". What am I doing wrong?
-
- ANSWER: Nothing, you just need to create /usr/spool/uucp (kermit 4.6?)
- or /usr/spool/locks (this is for the kermit5A), which is where kermit
- like to lock files.
-
- QUESTION: What are the major, minor numbers for the serial ports under linux?
-
- ANSWER: Major 4, Minor :
- 64 /dev/ttys0 - com1
- 65 /dev/ttys1 - com2
- 66 /dev/ttys2 - com3
- 67 /dev/ttys3 - com4
-
- QUESTION: can anyone give me a sample /etc/inittab entry for login
- from a pc attached to serial line /dev/ttys2?
-
- ANSWER: "Humberto speaking :), updated by Rick Miller"
- First set up the modem to turn off echo and enable auto answer, I do
- this in kermit by connecting to the modem and typing "ate0s0=1"
- followed by enter (w/o quotes). Then setup inittab to spawn getty on
- the modem
- ttys2:vt100:/etc/getty -m 1200 ttys2
- (Replace "vt100" with the name of the /etc/termcap entry for the
- terminal type you will use, or use "dumb" if you don't have one.)
-
- Then it should work. Some modems can be permanently set to disable
- echo and set auto answer, see your manual.
-
- Jim Weigand says:
- disable all messages. This will prevent getty from hanging up
- your modem.
- Set For:
- ATE0 No echo
- ATQ1 No messages
- ATS0=2 Answer 2nd ring
- ATS7=60 1 minute to answer (shorter if 2400 baud)
- You can use kermit to set these. Do an AT&W to save for power-up.
-
- Michael K. Johnson says:
- If you would rather not save these commands as defaults to come up
- on power-up, perhaps because you want to use your current modem
- settings under a DOS communications package, you can also shove
- these command out ttys? from /etc/rc (or /etc/rc.local) using
- the command:
- echo "<modem_settings>" > /dev/ttys?
-
- QUESTION: How do I set parameters like parity for serial login?
-
- ANSWER: Use stty and redirect input from the serial line.
- ex: stty parodd < /dev/ttys2 which gives ttys2 odd parity.
- type stty -a to get an idea of possible parameters.
- Or 'man stty' as well :)
-
-
- VII. MORE HINTS
- ===============
-
- This part try to keep track of the different information
- that appeared in comp.os.linux and on the list since beginning of
- March. I tried to update it for KERENL_VERSION, so there might be some
- mistakes. Moreover take care to use the correct library and include
- stuff, and the ad-hoc gcc you use !!!
-
-
- QUESTION: How can I backup my Hd under Linux ?
-
- ANSWER: I know at least two ways. One possibility is tar and mtools,
- another possibility is the diskbackup/diskrestore of Diamano Bolla
- (digest37 vol. #2) which saves big hd to floppies using the
- stdin/stdout. These utilities have been uploaded to the major sites in
- file disksplit.tar.Z.
- An example usage (Roger Binns) is:
-
- tar cvf - bin dev usr etc .. | compress | diskbackup
-
- and to restore:
-
- diskrestore | uncompress | tar xvf -
-
- BTW: if you are on Ethernet you could send your files via tar..|rsh (tar...)
- or even via NFS to a host which is regularly backed up !
-
-
- QUESTION: Where is 'which' ?
-
- ANSWER: It depends on the sh you are running:
- in bash 'type -path'
- in tcsh it's a builtin
-
- for rc you can try the following (untested by me) script from
- Kevin Brown:
-
- #!/bin/sh
- for i in `echo $PATH | sed 's/:/ /g'` ; do
- for j in ""$@" ; do
- if test -x "$i/$j" ; then
- echo "$i/$j"
- fi
- done
- done
-
- QUESTION: How to use setterm: for the novice?
-
- ANSWER:The setterm utility provides access to most of Virtual Consoles
- (VCs) functionality. You can set your screen up to blank at 10
- minutes using:
- setterm -blank 10
-
- You can set colors, and clear the screen. For a full list of commands,
- just type "setterm" with no arguments.
-
- There are a few tricks with the screen dumper can really make VCs go a
- long way. Here are a few of the common ones that I use:
-
- setterm dump
-
- Dumps the contents of the current VC to screen.dump (in the current dir).
-
- setterm dump 4
-
- Dumps the contents of VC 4 to screen.dump
-
- setterm -file mydumpfile -dump 4
-
- Dump the contents of VC 4 to the file mydumpfile
-
- setterm -file /dev/tty0 -dump 4
-
- Dumps the contents of VC 4 to the current VC.
-
- setterm -file /dev/tty4 -dump
-
- Dumps the contents of the current VC to VC 4.
-
- setterm -file /dev/ttys1 -dump
-
- Dumps the contents of the current VC to the serial port.
- Handy if you are logged on and want to paste a screen full without
- having to resort to doing a file transfer.
-
- setterm -file mydumpfile -append 4
-
- Appends to instead of overwriting the dump file. Useful if you
- have several screens you wish to concatenate.
-
-
- QUESTION: I've tried clear/reset which exist on most of unix but it
- doesn't work, have I missed something?
-
- ANSWER: setterm -clear or setterm -reset will solve your missing. For
- clear, you can also write a small script (which use the cl: part of
- /etc/termcap wrt your TERM), or use bash where ctrl-l will do it for
- you.
-
-
- QUESTION: I know there are VC, but where is the setterm stuff?
-
- ANSWER: It's in the current distribution (i.e. on the images), the
- source can be found in virtcons.tar.Z at nic.
-
-
- QUESTION: I know there are shared libraries; does there exist an easy
- way to check an executable for sharing ?
-
- ANSWER: (Josh Yelon & HJ Lu)
- (J.Y.) An executable which shares a library is linked with an
- (ordinary, non-shared) "stub" version of the library. One of the first
- thing this stub does (when the executable is run) is to ask the kernel
- to load the (big) "shared version" of the library (which is usually
- named /lib/lib.XX.XX) The upshot of this is that in the code for the
- stub (part of the executable), is the string "/lib/lib.XX.XX"; which
- can be searched by using 'strings' or 'grep'.
- (HJ. L.) if you have gcc2.11a or later the shared image is changed to
- /lib/libxxxx_vyy_zzz. And you should better use nm to find
- "__shared_lib" (nm failed on stripped executable). You can also write
- a function for "file", which can even check the version number ....
-
- (Claude Morin:) There exists at tsx-11 ldd.tar.Z If you follow
- the instructions, you will be able to type "ldd <executable>" to List
- the Dynamic Dependencies of the executables. In other words 'ldd'
- prints the name of the shared libraries needed by the executable,
- nothing appears for static one.
-
- QUESTION: What is the rdev program provided in the images?
-
- ANSWER: It's a program from Werner Almesberger of ETH. With no
- argument it prints the first line of /etc/mtab. With one argument, a
- boot-image, it prints the device configured as the root device, and
- with two arguments, a boot image and a device, it sets the device as
- default root in the specified image.
-
-
- QUESTION: How to start Linux from drive B?
-
- ANSWER: There is a DOS utility called boot_b.exe (look at DOS ftp).
- Another simple way is to open the box and invert the cables.
-
-
- QUESTION: The program boot_b works fine /but/ once the first disk is
- read the system go back to the first drive, any hints?
-
- ANSWER: Yes, change the bootimage in just the same way that you change
- it to boot on the hard drive, execept that the major/minor pair is
- different. All these information are in the file INSTALL-0.10.
- Remember that if you use a sun or other endian machine, you will need
- to reverse the byte order when you run the filter program (also in the
- same file).
-
-
- QUESTION: How can I get Linux to boot directly from the harddisk?
-
- ANSWER: (Rick) The best option right now is LILO version ALPHA.6. It
- has been generally agreed that the days of using "shoelace" are at an
- end.
-
- QUESTION: I use shoelace, but I want to change my root partition, what
- is the process to get rid of it?
-
- ANSWER: With Norton utility you can put back a standard boot sector.
- Another possibility is to restore the old boot sector (the one you
- should have backup *before* installing shoelace).
-
-
- QUESTION: Sometimes, when I want to remove a directory, I get an error
- message, is it a (known) bug?
-
- ANSWER: No, There is no bug at all, you probaly have another shell
- on another VC whose working directory is either the one you try to
- remove, either a subdirectory of it.
-
-
- QUESTION: I'm looking for init, getty, login, passwd stuff, where
- can I find them?
-
- ANSWER: You should find it in shadow.tar.Z (only sources), at least
- at tsx in the usr.bin directory. Many people have reported some troubles
- with the *OLD* shadow-passwd (shadow-bin.tar.Z and shadow-src.tar.Z, so
- do not use them anymore); an alternative might be the mcc-interim
- which contains standard passwd binary. There is also the Peter Orbaek's
- admutil-1.?.tar.Z and poeigl-1.?.tar.Z which contains source for
- shutdown, su, chsh, passwd and a system V init compatible.
-
-
- QUESTION: How can I setup a user account other than root ?
-
- ANSWER: You can either use the adduser program, either do it manually.
- In the later case, you have to:
- a) edit /etc/passwd as root and add a line of the following format:
- user:passwd:uid:gid:user name:home directory:login shell
-
- user is the login name; uid is the numeric user id, it should be
- unique; gid is the numeric group id, this number should correspond to
- an entry in /etc/group. The passwd field should be left blank 'cause
- it is stored in an encrypted form [to set this field just use the
- passwd program].
- example
- faq::200:5:Marc-Michel:/home/faq:/bin/sh
- b) Still as root, you shoud now create the home directory and set the
- correct ownership.
- mkdir /home/faq
- chown faq /home/faq
- chgrp 5 /home/faq
-
-
- QUESTION: I've been trying to get Linux to run on my [3/4]86 box. It
- can't even boot. Any suggestions?
-
- ANSWER: The most common error/problem is writing the bootimage to a
- low density disk. It fits, but the bootstrap code will only recognize
- high density disk. So try to format explicitely disk as high density:
- - for 3.5", 'format a: /n:18 /t:80 '
- - for 5.25", 'format a: /n:15 /t:80 '
-
-
- QUESTION: Does there exist games, languages (other than C), and
- anything which make the system more friendly?
-
- ANSWER: Yes, among other things there are rogue and yahtzee; TeX;
- Prolog, Perl.. but in general, if you want some extra tool port it to
- Linux this is also a good beta-testing exercice.
-
-
- QUESTION: Whenever I use uemacs 3.1X on a symlink, the symlink does
- not exist anymore, why?
-
- ANSWER: (Tristram Mabbs) Since ue3.10, uemacs uses 'safe save' mode,
- writing the file to a temporary and moving it OVER the original. In
- the process, this deletes the original. To prevent this just add the
- following in your emacs '.rc' file: set $ssave FALSE
-
-
- QUESTION: Uemacs doesn't work anymore with 0.95a, whenever I want to
- save a file; what can I do?
-
- ANSWER: ^S and ^Q are used for flow control. One solution is ^X^W
- followed by the filename, or M-X save-file, try also ^XS it could work
- for some version (not mine). Another possibility,
- if you have download the stty.tar.Z file, is to do stty -IXON
- before you first use uemacs (this can be included in your .profile).
- And the last is to recompile the Peter Orbaek init-1.2 package.
-
-
- QUESTION: I have an SVGA, but Linux detect an EGAc/EGAm; is it normal?
-
- ANSWER: (Jim Winstead) This is correct actually. You have an EGA+ card
- (SVGA) with a Color/Mono monitor. The only four possibilties are EGAc,
- EGAm, *MDA and *CGA (according to the code in
- kernel/chr_drv/console.c).
- The true test, if Linux detects your video card, is if you press
- <RETURN> at the "Press <RETURN> to see SVGA- ..." boot-time message.
- If you have a SVGA recognized card, it will ask you to choose a
- screen size. If not detected, the default is 80x50 mode.
- BTW if you have no SVGA, press the <space> and you are in 80x25 mode.
-
- If you have dowloaded the kernel, you can automatically skip this
- query at boot-time if you set the SVGA_MODE variable in the main
- Makefile before compiling a new bootimage.
-
-
- QUESTION: How can I change the keyboard repeat rate?
-
- ANSWER: (Michael K Johnson) In boot/setup.S there are the lines:
- ! set the keyboard repeat rate to max
- mov ax,#0x0305
- mov bx,0x0000
- int 0x16
-
- If you don't want to change the repeat rate at all, just comment out
- these lines. If you want something in the middle, change the
- mov bx,0x000
- by mov bx,0x??yy
- where ??yy is determined by (Ralf Brown's interrupt list)
- bh= delay value (0x00 = 250ms to 0x03= 1000ms (one sec))
- this is the delay before the repeat is performed
- bl= repeat rate (0x00 =30/sec to 0x1f=2/sec; 0x0c=10/sec [default])
-
-
- QUESTION: I compiled fdformat.c and ran it on 1.44Mb and 1.2Mb, the
- results are unreadable, any clue?
-
- ANSWER: (M. Pereckas) fdformat only low-level formats the disk. to use
- the fdformatted disk with DOS filesystem, run mformat on the disk.
- Mformat writes DOS filesystem information but is unable to low-format
- :). In order to put a Linux filesystem on a (low)formatted disk you
- have to mkfs it.
-
- QUESTION: Is it possible to disable the 3-fingers salute
- (ctrl-alt-del) ?
-
- ANSWER: Yes, in kernel/sys.c you can read the following:
-
- /*
- * this indicates wether you can reboot with ctrl-alt-del: the deault is yes
- */
- static int C_A_D = 1;
-
- there is also a small utility written by Linus in digest242 vol#2
-
-
- QUESTION: Could some one explain the information provided at boot-time?
-
- ANSWER: (Jim Winstead Jr)
- > serial port at 0x03f8 is a 16450
- > serial port at 0x02f8 is a 16450 (what's that the uart chip?)
-
- Right, the last number should either be 8250, 16450, 16550, or 16550a,
- and on the two 16550 models, it will report that FIFO's have been
- disable (16550) or enabled (16550a).
-
- > 8 virtual consoles (that's how many alt-F's I can get going?
- > but only F1-4 actually work)
-
- You can get sessions running on Alt-F[1-8], but the 'standard'
- /etc/inittab only runs getty/login on Alt-F[1-4]. You can start
- sessions on the other consoles by using 'doshell' or adding lines to
- /etc/inittab.
-
- > 4 pty's (are these the consoles F1-4?)
-
- No, those are 'pseudo' ttys, which programs like MGR use to simulate
- tty connections. That's probably a gross over-simplification, but it
- gives you the general idea, I think. :)
-
- > p_init: lp1 exists (0) (is that the (l)ine (p)rinter?)
-
- Right.
-
-
- QUESTION: What is the meaning of files ended by .T.Z (or .taz) ?
-
- ANSWER: The suffix Z is for compressed files (to uncompress them use
- the command `uncompress file.Z`).
- The suffix T indicates a "tar file" the usual suffix is tar but, the
- 14 chars filename limit of the Minix filesystem makes it cumbersome to
- use .tar.Z (to untar a file ended by .T, use the command
- `tar options file.T` (see the man page for more details).
-
- For the .taz file, change them as .T.Z and go-ahead.
-
-
- QUESTION: I have upgraded the kernel from XX to YY (XX > YY), however the
- login screen still says YY.
-
- ANSWER: Just change the message in one of these files: /etc/issue and
- /etc/motd. The former contains the message before the login, the later
- is the one after you are logged in.
-
- QUESTION: What is doshell good for ?
-
- ANSWER: It's an old program provided in the early Linux version (0.12)
- when the getty was not already there, it spawns a shell on any tty's.
- (Mattew Gream): I do this quite often ( getty on tty1, 2, 3 and my
- rc.local spawns a shell on tty4 as follows
- '/usr/bin/doshell /dev/tty4 /bin/tcsh &'
-
-
- QUESTION: I don't have the kernel sources, how can I change the keyboard
- language?
-
- ANSWER: You can use the fixkbd program written by
- laurentj@hpgnse2.grenoble.hp.com. Its purpose is to fix the
- keyboard map used in your kernel image. It works more or less a la
- "rootdev" (or rdev).
-
-
- --
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # LaBRI | #
- # 351 cours de la Liberation | e-mail: corsini@labri.greco-prog.fr #
- # 33405 Talence Cedex | #
- # | #
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- --
- There will be some sig, once our local net will be reliable.
- Right now I rather stay anonymous.
-